package com.hk.springbootmybatisplus.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author by 何坤
 * @Classname MyBatisPlusConfig
 * @Description TODO
 * @Date 2019/9/28 16:32
 */
@Configuration
public class MyBatisPlusConfig {

    /**
     * 若想使用mybatis plus的分页功能，需要配置PaginationInterceptor插件
     * @param
     * @return com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
     * @date 2019/9/28 16:34
     * @author 何坤
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
